This invention relates generally to device driver software components (objects), and more particularly to extending such objects with new capabilities.
Operating system and device driver vendors currently provide standard device drivers enabling application programs to control the operation of computer peripherals. However, the software components, or objects, comprising the driver usually have limited extensibility. For example, a driver object may only be able to expose to other objects and application programs a standard predefined interface.
Object architectures such as Microsoft Corp.""s Component Object Model (COM) sometimes provide a mechanism by which these objects can be extended with custom interfaces. However, this usually entails modifying the original driver object itself, so that it knows to expose a desired custom interface. Thus, it is generally not possible for third parties to add additional custom software interfaces for a driver without modifying the driver""s code in some way.
Thus, clients wishing to use custom interfaces for a particular device that are not part of the original driver or its framework must have some ad hoc mechanism to find objects implementing those interfaces for the desired device. For these and other reasons, there is a need for the present invention.
The invention provides for extending driver objects. In one embodiment, a system includes a driver object, an auto-aggregator object, and a driver extension object. The driver object has a set of at least one standard interface. The auto-aggregator object is aggregated to the driver object by a blind aggregation mechanism. The driver extension object is aggregated to the driver object by an auto-aggregation mechanism invoked by the auto-aggregator object to provide a custom interface for the driver object. In another embodiment, an aggregation map is used to map an interface identifier to a driver extension class.